import request from '@/config/axios'

export interface ProductsListVO {
  id: number
  no: string
  name: string
  packageType: number
  suitActivity: number
  boyNum: number
  girlNum: number
  optProduct: string
  price: number
  status: number
  isWriteoff: number
  cover: string
}

// 查询相亲活动信息列表
export const getProductsListPage = async (params) => {
  return await request.get({ url: `/activity/product-info/page`, params })
}

// 获得相亲套餐类型列表
export const getProductsListList = async (ids: number) => {
  return await request.get({ url: `/activity/product-info/list?ids=` + ids })
}

// 获得相亲套餐类型列表
export const getProductsListListAll = async () => {
  return await request.get({ url: `/activity/product-info/getProductTypeList` })
}

// 查询相亲活动信息详情
export const getProductsList = async (id: number) => {
  return await request.get({ url: `/activity/product-info/get?id=` + id })
}

// 新增相亲活动信息
export const createProductsList = async (data: ProductsListVO) => {
  return await request.post({ url: `/activity/product-info/create`, data })
}

// 修改相亲活动信息
export const updateProductsList = async (data: ProductsListVO) => {
  return await request.put({ url: `/activity/product-info/update`, data })
}

// 删除相亲活动信息
export const deleteProductsList = async (id: number) => {
  return await request.delete({ url: `/activity/product-info/delete?id=` + id })
}

// 导出相亲活动信息 Excel
export const exportProductsList = async (params) => {
  return await request.download({ url: `/activity/product-info/export-excel`, params })
}
